// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.
#![allow(rustdoc::redundant_explicit_links)]
#![allow(rustdoc::broken_intra_doc_links)]

/// Implements a client for the Client Libraries Showcase API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_showcase_v1beta1::client::Compliance;
/// let client = Compliance::builder().build().await?;
/// // use `client` to make requests to the Client Libraries Showcase API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// This service is used to test that GAPICs implement various REST-related features correctly. This mostly means transcoding proto3 requests to REST format
/// correctly for various types of HTTP annotations, but it also includes verifying that unknown (numeric) enums received by clients can be round-tripped
/// correctly.
///
/// # Configuration
///
/// To configure `Compliance` use the `with_*` methods in the type returned
/// by [builder()][Compliance::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://localhost:7469`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::compliance::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::compliance::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `Compliance` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `Compliance` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct Compliance {
    inner: std::sync::Arc<dyn super::stub::dynamic::Compliance>,
}

impl Compliance {
    /// Returns a builder for [Compliance].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_showcase_v1beta1::client::Compliance;
    /// let client = Compliance::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::compliance::ClientBuilder {
        gax::client_builder::internal::new_builder(super::builder::compliance::client::Factory)
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::Compliance + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::Compliance>> {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::Compliance> {
        super::transport::Compliance::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::Compliance> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::Compliance::new)
    }

    /// This method echoes the ComplianceData request. This method exercises
    /// sending the entire request object in the REST body.
    pub fn repeat_data_body(&self) -> super::builder::compliance::RepeatDataBody {
        super::builder::compliance::RepeatDataBody::new(self.inner.clone())
    }

    /// This method echoes the ComplianceData request. This method exercises
    /// sending the a message-type field in the REST body. Per AIP-127, only
    /// top-level, non-repeated fields can be sent this way.
    pub fn repeat_data_body_info(&self) -> super::builder::compliance::RepeatDataBodyInfo {
        super::builder::compliance::RepeatDataBodyInfo::new(self.inner.clone())
    }

    /// This method echoes the ComplianceData request. This method exercises
    /// sending all request fields as query parameters.
    pub fn repeat_data_query(&self) -> super::builder::compliance::RepeatDataQuery {
        super::builder::compliance::RepeatDataQuery::new(self.inner.clone())
    }

    /// This method echoes the ComplianceData request. This method exercises
    /// sending some parameters as "simple" path variables (i.e., of the form
    /// "/bar/{foo}" rather than "/{foo=bar/*}"), and the rest as query parameters.
    pub fn repeat_data_simple_path(&self) -> super::builder::compliance::RepeatDataSimplePath {
        super::builder::compliance::RepeatDataSimplePath::new(self.inner.clone())
    }

    /// Same as RepeatDataSimplePath, but with a path resource.
    pub fn repeat_data_path_resource(&self) -> super::builder::compliance::RepeatDataPathResource {
        super::builder::compliance::RepeatDataPathResource::new(self.inner.clone())
    }

    /// Same as RepeatDataSimplePath, but with a trailing resource.
    pub fn repeat_data_path_trailing_resource(
        &self,
    ) -> super::builder::compliance::RepeatDataPathTrailingResource {
        super::builder::compliance::RepeatDataPathTrailingResource::new(self.inner.clone())
    }

    /// This method echoes the ComplianceData request, using the HTTP PUT method.
    pub fn repeat_data_body_put(&self) -> super::builder::compliance::RepeatDataBodyPut {
        super::builder::compliance::RepeatDataBodyPut::new(self.inner.clone())
    }

    /// This method echoes the ComplianceData request, using the HTTP PATCH method.
    pub fn repeat_data_body_patch(&self) -> super::builder::compliance::RepeatDataBodyPatch {
        super::builder::compliance::RepeatDataBodyPatch::new(self.inner.clone())
    }

    /// This method requests an enum value from the server. Depending on the contents of EnumRequest, the enum value returned will be a known enum declared in the
    /// .proto file, or a made-up enum value the is unknown to the client. To verify that clients can round-trip unknown enum values they receive, use the
    /// response from this RPC as the request to VerifyEnum()
    ///
    /// The values of enums sent by the server when a known or unknown value is requested will be the same within a single Showcase server run (this is needed for
    /// VerifyEnum() to work) but are not guaranteed to be the same across separate Showcase server runs.
    pub fn get_enum(&self) -> super::builder::compliance::GetEnum {
        super::builder::compliance::GetEnum::new(self.inner.clone())
    }

    /// This method is used to verify that clients can round-trip enum values, which is particularly important for unknown enum values over REST. VerifyEnum()
    /// verifies that its request, which is presumably the response that the client previously got to a GetEnum(), contains the correct data. If so, it responds
    /// with the same EnumResponse; otherwise, the RPC errors.
    ///
    /// This works because the values of enums sent by the server when a known or unknown value is requested will be the same within a single Showcase server run,
    /// although they are not guaranteed to be the same across separate Showcase server runs.
    pub fn verify_enum(&self) -> super::builder::compliance::VerifyEnum {
        super::builder::compliance::VerifyEnum::new(self.inner.clone())
    }

    /// Provides the [Locations][google.cloud.location.Locations] service functionality in this service.
    ///
    /// [google.cloud.location.Locations]: location::client::Locations
    pub fn list_locations(&self) -> super::builder::compliance::ListLocations {
        super::builder::compliance::ListLocations::new(self.inner.clone())
    }

    /// Provides the [Locations][google.cloud.location.Locations] service functionality in this service.
    ///
    /// [google.cloud.location.Locations]: location::client::Locations
    pub fn get_location(&self) -> super::builder::compliance::GetLocation {
        super::builder::compliance::GetLocation::new(self.inner.clone())
    }

    /// Provides the [IAMPolicy][google.iam.v1.IAMPolicy] service functionality in this service.
    ///
    /// [google.iam.v1.IAMPolicy]: iam_v1::client::IAMPolicy
    pub fn set_iam_policy(&self) -> super::builder::compliance::SetIamPolicy {
        super::builder::compliance::SetIamPolicy::new(self.inner.clone())
    }

    /// Provides the [IAMPolicy][google.iam.v1.IAMPolicy] service functionality in this service.
    ///
    /// [google.iam.v1.IAMPolicy]: iam_v1::client::IAMPolicy
    pub fn get_iam_policy(&self) -> super::builder::compliance::GetIamPolicy {
        super::builder::compliance::GetIamPolicy::new(self.inner.clone())
    }

    /// Provides the [IAMPolicy][google.iam.v1.IAMPolicy] service functionality in this service.
    ///
    /// [google.iam.v1.IAMPolicy]: iam_v1::client::IAMPolicy
    pub fn test_iam_permissions(&self) -> super::builder::compliance::TestIamPermissions {
        super::builder::compliance::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::compliance::ListOperations {
        super::builder::compliance::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::compliance::GetOperation {
        super::builder::compliance::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::compliance::DeleteOperation {
        super::builder::compliance::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::compliance::CancelOperation {
        super::builder::compliance::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the Client Libraries Showcase API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_showcase_v1beta1::client::Echo;
/// let client = Echo::builder().build().await?;
/// // use `client` to make requests to the Client Libraries Showcase API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// This service is used showcase the four main types of rpcs - unary, server
/// side streaming, client side streaming, and bidirectional streaming. This
/// service also exposes methods that explicitly implement server delay, and
/// paginated calls. Set the 'showcase-trailer' metadata key on any method
/// to have the values echoed in the response trailers. Set the
/// 'x-goog-request-params' metadata key on any method to have the values
/// echoed in the response headers.
///
/// # Configuration
///
/// To configure `Echo` use the `with_*` methods in the type returned
/// by [builder()][Echo::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://localhost:7469`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::echo::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::echo::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `Echo` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `Echo` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct Echo {
    inner: std::sync::Arc<dyn super::stub::dynamic::Echo>,
}

impl Echo {
    /// Returns a builder for [Echo].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_showcase_v1beta1::client::Echo;
    /// let client = Echo::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::echo::ClientBuilder {
        gax::client_builder::internal::new_builder(super::builder::echo::client::Factory)
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::Echo + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::Echo>> {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::Echo> {
        super::transport::Echo::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::Echo> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::Echo::new)
    }

    /// This method simply echoes the request. This method showcases unary RPCs.
    pub fn echo(&self) -> super::builder::echo::Echo {
        super::builder::echo::Echo::new(self.inner.clone())
    }

    /// This method returns error details in a repeated "google.protobuf.Any"
    /// field. This method showcases handling errors thus encoded, particularly
    /// over REST transport. Note that GAPICs only allow the type
    /// "google.protobuf.Any" for field paths ending in "error.details", and, at
    /// run-time, the actual types for these fields must be one of the types in
    /// google/rpc/error_details.proto.
    pub fn echo_error_details(&self) -> super::builder::echo::EchoErrorDetails {
        super::builder::echo::EchoErrorDetails::new(self.inner.clone())
    }

    /// This method always fails with a gRPC "Aborted" error status that contains
    /// multiple error details.  These include one instance of each of the standard
    /// ones in error_details.proto
    /// (<https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto>)
    /// plus a custom, Showcase-defined PoetryError. The intent of this RPC is to
    /// verify that GAPICs can process these various error details and surface them
    /// to the user in an idiomatic form.
    pub fn fail_echo_with_details(&self) -> super::builder::echo::FailEchoWithDetails {
        super::builder::echo::FailEchoWithDetails::new(self.inner.clone())
    }

    /// This is similar to the Expand method but instead of returning a stream of
    /// expanded words, this method returns a paged list of expanded words.
    pub fn paged_expand(&self) -> super::builder::echo::PagedExpand {
        super::builder::echo::PagedExpand::new(self.inner.clone())
    }

    /// This is similar to the PagedExpand except that it uses
    /// max_results instead of page_size, as some legacy APIs still
    /// do. New APIs should NOT use this pattern.
    pub fn paged_expand_legacy(&self) -> super::builder::echo::PagedExpandLegacy {
        super::builder::echo::PagedExpandLegacy::new(self.inner.clone())
    }

    /// This method returns a map containing lists of words that appear in the input, keyed by their
    /// initial character. The only words returned are the ones included in the current page,
    /// as determined by page_token and page_size, which both refer to the word indices in the
    /// input. This paging result consisting of a map of lists is a pattern used by some legacy
    /// APIs. New APIs should NOT use this pattern.
    pub fn paged_expand_legacy_mapped(&self) -> super::builder::echo::PagedExpandLegacyMapped {
        super::builder::echo::PagedExpandLegacyMapped::new(self.inner.clone())
    }

    /// This method will wait for the requested amount of time and then return.
    /// This method showcases how a client handles a request timeout.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn wait(&self) -> super::builder::echo::Wait {
        super::builder::echo::Wait::new(self.inner.clone())
    }

    /// This method will block (wait) for the requested amount of time
    /// and then return the response or error.
    /// This method showcases how a client handles delays or retries.
    pub fn block(&self) -> super::builder::echo::Block {
        super::builder::echo::Block::new(self.inner.clone())
    }

    /// Provides the [Locations][google.cloud.location.Locations] service functionality in this service.
    ///
    /// [google.cloud.location.Locations]: location::client::Locations
    pub fn list_locations(&self) -> super::builder::echo::ListLocations {
        super::builder::echo::ListLocations::new(self.inner.clone())
    }

    /// Provides the [Locations][google.cloud.location.Locations] service functionality in this service.
    ///
    /// [google.cloud.location.Locations]: location::client::Locations
    pub fn get_location(&self) -> super::builder::echo::GetLocation {
        super::builder::echo::GetLocation::new(self.inner.clone())
    }

    /// Provides the [IAMPolicy][google.iam.v1.IAMPolicy] service functionality in this service.
    ///
    /// [google.iam.v1.IAMPolicy]: iam_v1::client::IAMPolicy
    pub fn set_iam_policy(&self) -> super::builder::echo::SetIamPolicy {
        super::builder::echo::SetIamPolicy::new(self.inner.clone())
    }

    /// Provides the [IAMPolicy][google.iam.v1.IAMPolicy] service functionality in this service.
    ///
    /// [google.iam.v1.IAMPolicy]: iam_v1::client::IAMPolicy
    pub fn get_iam_policy(&self) -> super::builder::echo::GetIamPolicy {
        super::builder::echo::GetIamPolicy::new(self.inner.clone())
    }

    /// Provides the [IAMPolicy][google.iam.v1.IAMPolicy] service functionality in this service.
    ///
    /// [google.iam.v1.IAMPolicy]: iam_v1::client::IAMPolicy
    pub fn test_iam_permissions(&self) -> super::builder::echo::TestIamPermissions {
        super::builder::echo::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::echo::ListOperations {
        super::builder::echo::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::echo::GetOperation {
        super::builder::echo::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::echo::DeleteOperation {
        super::builder::echo::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::echo::CancelOperation {
        super::builder::echo::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the Client Libraries Showcase API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_showcase_v1beta1::client::Identity;
/// let client = Identity::builder().build().await?;
/// // use `client` to make requests to the Client Libraries Showcase API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// A simple identity service.
///
/// # Configuration
///
/// To configure `Identity` use the `with_*` methods in the type returned
/// by [builder()][Identity::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://localhost:7469`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::identity::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::identity::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `Identity` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `Identity` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct Identity {
    inner: std::sync::Arc<dyn super::stub::dynamic::Identity>,
}

impl Identity {
    /// Returns a builder for [Identity].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_showcase_v1beta1::client::Identity;
    /// let client = Identity::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::identity::ClientBuilder {
        gax::client_builder::internal::new_builder(super::builder::identity::client::Factory)
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::Identity + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::Identity>> {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::Identity> {
        super::transport::Identity::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::Identity> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::Identity::new)
    }

    /// Creates a user.
    pub fn create_user(&self) -> super::builder::identity::CreateUser {
        super::builder::identity::CreateUser::new(self.inner.clone())
    }

    /// Retrieves the User with the given uri.
    pub fn get_user(&self) -> super::builder::identity::GetUser {
        super::builder::identity::GetUser::new(self.inner.clone())
    }

    /// Updates a user.
    pub fn update_user(&self) -> super::builder::identity::UpdateUser {
        super::builder::identity::UpdateUser::new(self.inner.clone())
    }

    /// Deletes a user, their profile, and all of their authored messages.
    pub fn delete_user(&self) -> super::builder::identity::DeleteUser {
        super::builder::identity::DeleteUser::new(self.inner.clone())
    }

    /// Lists all users.
    pub fn list_users(&self) -> super::builder::identity::ListUsers {
        super::builder::identity::ListUsers::new(self.inner.clone())
    }

    /// Provides the [Locations][google.cloud.location.Locations] service functionality in this service.
    ///
    /// [google.cloud.location.Locations]: location::client::Locations
    pub fn list_locations(&self) -> super::builder::identity::ListLocations {
        super::builder::identity::ListLocations::new(self.inner.clone())
    }

    /// Provides the [Locations][google.cloud.location.Locations] service functionality in this service.
    ///
    /// [google.cloud.location.Locations]: location::client::Locations
    pub fn get_location(&self) -> super::builder::identity::GetLocation {
        super::builder::identity::GetLocation::new(self.inner.clone())
    }

    /// Provides the [IAMPolicy][google.iam.v1.IAMPolicy] service functionality in this service.
    ///
    /// [google.iam.v1.IAMPolicy]: iam_v1::client::IAMPolicy
    pub fn set_iam_policy(&self) -> super::builder::identity::SetIamPolicy {
        super::builder::identity::SetIamPolicy::new(self.inner.clone())
    }

    /// Provides the [IAMPolicy][google.iam.v1.IAMPolicy] service functionality in this service.
    ///
    /// [google.iam.v1.IAMPolicy]: iam_v1::client::IAMPolicy
    pub fn get_iam_policy(&self) -> super::builder::identity::GetIamPolicy {
        super::builder::identity::GetIamPolicy::new(self.inner.clone())
    }

    /// Provides the [IAMPolicy][google.iam.v1.IAMPolicy] service functionality in this service.
    ///
    /// [google.iam.v1.IAMPolicy]: iam_v1::client::IAMPolicy
    pub fn test_iam_permissions(&self) -> super::builder::identity::TestIamPermissions {
        super::builder::identity::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::identity::ListOperations {
        super::builder::identity::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::identity::GetOperation {
        super::builder::identity::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::identity::DeleteOperation {
        super::builder::identity::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::identity::CancelOperation {
        super::builder::identity::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the Client Libraries Showcase API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_showcase_v1beta1::client::Messaging;
/// let client = Messaging::builder().build().await?;
/// // use `client` to make requests to the Client Libraries Showcase API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// A simple messaging service that implements chat rooms and profile posts.
///
/// This messaging service showcases the features that API clients
/// generated by gapic-generators implement.
///
/// # Configuration
///
/// To configure `Messaging` use the `with_*` methods in the type returned
/// by [builder()][Messaging::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://localhost:7469`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::messaging::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::messaging::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `Messaging` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `Messaging` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct Messaging {
    inner: std::sync::Arc<dyn super::stub::dynamic::Messaging>,
}

impl Messaging {
    /// Returns a builder for [Messaging].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_showcase_v1beta1::client::Messaging;
    /// let client = Messaging::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::messaging::ClientBuilder {
        gax::client_builder::internal::new_builder(super::builder::messaging::client::Factory)
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::Messaging + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::Messaging>> {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::Messaging> {
        super::transport::Messaging::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::Messaging> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::Messaging::new)
    }

    /// Creates a room.
    pub fn create_room(&self) -> super::builder::messaging::CreateRoom {
        super::builder::messaging::CreateRoom::new(self.inner.clone())
    }

    /// Retrieves the Room with the given resource name.
    pub fn get_room(&self) -> super::builder::messaging::GetRoom {
        super::builder::messaging::GetRoom::new(self.inner.clone())
    }

    /// Updates a room.
    pub fn update_room(&self) -> super::builder::messaging::UpdateRoom {
        super::builder::messaging::UpdateRoom::new(self.inner.clone())
    }

    /// Deletes a room and all of its blurbs.
    pub fn delete_room(&self) -> super::builder::messaging::DeleteRoom {
        super::builder::messaging::DeleteRoom::new(self.inner.clone())
    }

    /// Lists all chat rooms.
    pub fn list_rooms(&self) -> super::builder::messaging::ListRooms {
        super::builder::messaging::ListRooms::new(self.inner.clone())
    }

    /// Creates a blurb. If the parent is a room, the blurb is understood to be a
    /// message in that room. If the parent is a profile, the blurb is understood
    /// to be a post on the profile.
    pub fn create_blurb(&self) -> super::builder::messaging::CreateBlurb {
        super::builder::messaging::CreateBlurb::new(self.inner.clone())
    }

    /// Retrieves the Blurb with the given resource name.
    pub fn get_blurb(&self) -> super::builder::messaging::GetBlurb {
        super::builder::messaging::GetBlurb::new(self.inner.clone())
    }

    /// Updates a blurb.
    pub fn update_blurb(&self) -> super::builder::messaging::UpdateBlurb {
        super::builder::messaging::UpdateBlurb::new(self.inner.clone())
    }

    /// Deletes a blurb.
    pub fn delete_blurb(&self) -> super::builder::messaging::DeleteBlurb {
        super::builder::messaging::DeleteBlurb::new(self.inner.clone())
    }

    /// Lists blurbs for a specific chat room or user profile depending on the
    /// parent resource name.
    pub fn list_blurbs(&self) -> super::builder::messaging::ListBlurbs {
        super::builder::messaging::ListBlurbs::new(self.inner.clone())
    }

    /// This method searches through all blurbs across all rooms and profiles
    /// for blurbs containing to words found in the query. Only posts that
    /// contain an exact match of a queried word will be returned.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn search_blurbs(&self) -> super::builder::messaging::SearchBlurbs {
        super::builder::messaging::SearchBlurbs::new(self.inner.clone())
    }

    /// Provides the [Locations][google.cloud.location.Locations] service functionality in this service.
    ///
    /// [google.cloud.location.Locations]: location::client::Locations
    pub fn list_locations(&self) -> super::builder::messaging::ListLocations {
        super::builder::messaging::ListLocations::new(self.inner.clone())
    }

    /// Provides the [Locations][google.cloud.location.Locations] service functionality in this service.
    ///
    /// [google.cloud.location.Locations]: location::client::Locations
    pub fn get_location(&self) -> super::builder::messaging::GetLocation {
        super::builder::messaging::GetLocation::new(self.inner.clone())
    }

    /// Provides the [IAMPolicy][google.iam.v1.IAMPolicy] service functionality in this service.
    ///
    /// [google.iam.v1.IAMPolicy]: iam_v1::client::IAMPolicy
    pub fn set_iam_policy(&self) -> super::builder::messaging::SetIamPolicy {
        super::builder::messaging::SetIamPolicy::new(self.inner.clone())
    }

    /// Provides the [IAMPolicy][google.iam.v1.IAMPolicy] service functionality in this service.
    ///
    /// [google.iam.v1.IAMPolicy]: iam_v1::client::IAMPolicy
    pub fn get_iam_policy(&self) -> super::builder::messaging::GetIamPolicy {
        super::builder::messaging::GetIamPolicy::new(self.inner.clone())
    }

    /// Provides the [IAMPolicy][google.iam.v1.IAMPolicy] service functionality in this service.
    ///
    /// [google.iam.v1.IAMPolicy]: iam_v1::client::IAMPolicy
    pub fn test_iam_permissions(&self) -> super::builder::messaging::TestIamPermissions {
        super::builder::messaging::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::messaging::ListOperations {
        super::builder::messaging::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::messaging::GetOperation {
        super::builder::messaging::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::messaging::DeleteOperation {
        super::builder::messaging::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::messaging::CancelOperation {
        super::builder::messaging::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the Client Libraries Showcase API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_showcase_v1beta1::client::SequenceService;
/// let client = SequenceService::builder().build().await?;
/// // use `client` to make requests to the Client Libraries Showcase API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
///
/// # Configuration
///
/// To configure `SequenceService` use the `with_*` methods in the type returned
/// by [builder()][SequenceService::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://localhost:7469`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::sequence_service::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::sequence_service::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `SequenceService` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `SequenceService` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct SequenceService {
    inner: std::sync::Arc<dyn super::stub::dynamic::SequenceService>,
}

impl SequenceService {
    /// Returns a builder for [SequenceService].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_showcase_v1beta1::client::SequenceService;
    /// let client = SequenceService::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::sequence_service::ClientBuilder {
        gax::client_builder::internal::new_builder(
            super::builder::sequence_service::client::Factory,
        )
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::SequenceService + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::SequenceService>>
    {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::SequenceService> {
        super::transport::SequenceService::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::SequenceService> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::SequenceService::new)
    }

    /// Creates a sequence.
    pub fn create_sequence(&self) -> super::builder::sequence_service::CreateSequence {
        super::builder::sequence_service::CreateSequence::new(self.inner.clone())
    }

    /// Creates a sequence.
    pub fn create_streaming_sequence(
        &self,
    ) -> super::builder::sequence_service::CreateStreamingSequence {
        super::builder::sequence_service::CreateStreamingSequence::new(self.inner.clone())
    }

    /// Retrieves a sequence.
    pub fn get_sequence_report(&self) -> super::builder::sequence_service::GetSequenceReport {
        super::builder::sequence_service::GetSequenceReport::new(self.inner.clone())
    }

    /// Retrieves a sequence.
    pub fn get_streaming_sequence_report(
        &self,
    ) -> super::builder::sequence_service::GetStreamingSequenceReport {
        super::builder::sequence_service::GetStreamingSequenceReport::new(self.inner.clone())
    }

    /// Attempts a sequence.
    pub fn attempt_sequence(&self) -> super::builder::sequence_service::AttemptSequence {
        super::builder::sequence_service::AttemptSequence::new(self.inner.clone())
    }

    /// Provides the [Locations][google.cloud.location.Locations] service functionality in this service.
    ///
    /// [google.cloud.location.Locations]: location::client::Locations
    pub fn list_locations(&self) -> super::builder::sequence_service::ListLocations {
        super::builder::sequence_service::ListLocations::new(self.inner.clone())
    }

    /// Provides the [Locations][google.cloud.location.Locations] service functionality in this service.
    ///
    /// [google.cloud.location.Locations]: location::client::Locations
    pub fn get_location(&self) -> super::builder::sequence_service::GetLocation {
        super::builder::sequence_service::GetLocation::new(self.inner.clone())
    }

    /// Provides the [IAMPolicy][google.iam.v1.IAMPolicy] service functionality in this service.
    ///
    /// [google.iam.v1.IAMPolicy]: iam_v1::client::IAMPolicy
    pub fn set_iam_policy(&self) -> super::builder::sequence_service::SetIamPolicy {
        super::builder::sequence_service::SetIamPolicy::new(self.inner.clone())
    }

    /// Provides the [IAMPolicy][google.iam.v1.IAMPolicy] service functionality in this service.
    ///
    /// [google.iam.v1.IAMPolicy]: iam_v1::client::IAMPolicy
    pub fn get_iam_policy(&self) -> super::builder::sequence_service::GetIamPolicy {
        super::builder::sequence_service::GetIamPolicy::new(self.inner.clone())
    }

    /// Provides the [IAMPolicy][google.iam.v1.IAMPolicy] service functionality in this service.
    ///
    /// [google.iam.v1.IAMPolicy]: iam_v1::client::IAMPolicy
    pub fn test_iam_permissions(&self) -> super::builder::sequence_service::TestIamPermissions {
        super::builder::sequence_service::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::sequence_service::ListOperations {
        super::builder::sequence_service::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::sequence_service::GetOperation {
        super::builder::sequence_service::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::sequence_service::DeleteOperation {
        super::builder::sequence_service::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::sequence_service::CancelOperation {
        super::builder::sequence_service::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the Client Libraries Showcase API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_showcase_v1beta1::client::Testing;
/// let client = Testing::builder().build().await?;
/// // use `client` to make requests to the Client Libraries Showcase API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// A service to facilitate running discrete sets of tests
/// against Showcase.
/// Adding this comment with special characters for comment formatting tests:
///
/// 1. (abra->kadabra->alakazam)
///
/// 1. [Nonsense][]: `pokemon/*/psychic/*`
///
/// # Configuration
///
/// To configure `Testing` use the `with_*` methods in the type returned
/// by [builder()][Testing::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://localhost:7469`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::testing::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::testing::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `Testing` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `Testing` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct Testing {
    inner: std::sync::Arc<dyn super::stub::dynamic::Testing>,
}

impl Testing {
    /// Returns a builder for [Testing].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_showcase_v1beta1::client::Testing;
    /// let client = Testing::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::testing::ClientBuilder {
        gax::client_builder::internal::new_builder(super::builder::testing::client::Factory)
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::Testing + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::Testing>> {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::Testing> {
        super::transport::Testing::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::Testing> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::Testing::new)
    }

    /// Creates a new testing session.
    /// Adding this comment with special characters for comment formatting tests:
    ///
    /// 1. (abra->kadabra->alakazam)
    ///
    /// 1. [Nonsense][]: `pokemon/*/psychic/*`
    pub fn create_session(&self) -> super::builder::testing::CreateSession {
        super::builder::testing::CreateSession::new(self.inner.clone())
    }

    /// Gets a testing session.
    pub fn get_session(&self) -> super::builder::testing::GetSession {
        super::builder::testing::GetSession::new(self.inner.clone())
    }

    /// Lists the current test sessions.
    pub fn list_sessions(&self) -> super::builder::testing::ListSessions {
        super::builder::testing::ListSessions::new(self.inner.clone())
    }

    /// Delete a test session.
    pub fn delete_session(&self) -> super::builder::testing::DeleteSession {
        super::builder::testing::DeleteSession::new(self.inner.clone())
    }

    /// Report on the status of a session.
    /// This generates a report detailing which tests have been completed,
    /// and an overall rollup.
    pub fn report_session(&self) -> super::builder::testing::ReportSession {
        super::builder::testing::ReportSession::new(self.inner.clone())
    }

    /// List the tests of a sessesion.
    pub fn list_tests(&self) -> super::builder::testing::ListTests {
        super::builder::testing::ListTests::new(self.inner.clone())
    }

    /// Explicitly decline to implement a test.
    ///
    /// This removes the test from subsequent `ListTests` calls, and
    /// attempting to do the test will error.
    ///
    /// This method will error if attempting to delete a required test.
    pub fn delete_test(&self) -> super::builder::testing::DeleteTest {
        super::builder::testing::DeleteTest::new(self.inner.clone())
    }

    /// Register a response to a test.
    ///
    /// In cases where a test involves registering a final answer at the
    /// end of the test, this method provides the means to do so.
    pub fn verify_test(&self) -> super::builder::testing::VerifyTest {
        super::builder::testing::VerifyTest::new(self.inner.clone())
    }

    /// Provides the [Locations][google.cloud.location.Locations] service functionality in this service.
    ///
    /// [google.cloud.location.Locations]: location::client::Locations
    pub fn list_locations(&self) -> super::builder::testing::ListLocations {
        super::builder::testing::ListLocations::new(self.inner.clone())
    }

    /// Provides the [Locations][google.cloud.location.Locations] service functionality in this service.
    ///
    /// [google.cloud.location.Locations]: location::client::Locations
    pub fn get_location(&self) -> super::builder::testing::GetLocation {
        super::builder::testing::GetLocation::new(self.inner.clone())
    }

    /// Provides the [IAMPolicy][google.iam.v1.IAMPolicy] service functionality in this service.
    ///
    /// [google.iam.v1.IAMPolicy]: iam_v1::client::IAMPolicy
    pub fn set_iam_policy(&self) -> super::builder::testing::SetIamPolicy {
        super::builder::testing::SetIamPolicy::new(self.inner.clone())
    }

    /// Provides the [IAMPolicy][google.iam.v1.IAMPolicy] service functionality in this service.
    ///
    /// [google.iam.v1.IAMPolicy]: iam_v1::client::IAMPolicy
    pub fn get_iam_policy(&self) -> super::builder::testing::GetIamPolicy {
        super::builder::testing::GetIamPolicy::new(self.inner.clone())
    }

    /// Provides the [IAMPolicy][google.iam.v1.IAMPolicy] service functionality in this service.
    ///
    /// [google.iam.v1.IAMPolicy]: iam_v1::client::IAMPolicy
    pub fn test_iam_permissions(&self) -> super::builder::testing::TestIamPermissions {
        super::builder::testing::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::testing::ListOperations {
        super::builder::testing::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::testing::GetOperation {
        super::builder::testing::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::testing::DeleteOperation {
        super::builder::testing::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::testing::CancelOperation {
        super::builder::testing::CancelOperation::new(self.inner.clone())
    }
}
